/**
 * Copyright ©2012-2018 HopeHaiyang Corporation, All Rights Reserved
 * http://www.wuhanhope.com
 */
package hope.platform.data.server.remote;

import hope.platform.data.domain.entity.ObservedData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * class info
 *
 * @author hujia
 *         Create at 2018/7/24 16:19
 */
@FeignClient("observed")
public interface ObservedService {

    @RequestMapping(value = "/observed/count/{serialNumber}/{dataName}/{beginTime}/{endTime}", method = RequestMethod.GET)
    int countResult(@PathVariable(value = "serialNumber") String serialNumber,
                    @PathVariable(value = "dataName") String dataName,
                    @PathVariable(value = "beginTime") String beginTime,
                    @PathVariable(value = "endTime") String endTime);

    @RequestMapping(value = "/{serialNumber}/{dataName}/{beginTime}/{endTime}", method = RequestMethod.GET)
    List<ObservedData> getBySerialNumberAndDataNameAndGmtCreateBetween(
            @PathVariable(value = "serialNumber") String serialNumber,
            @PathVariable(value = "dataName") String dataName,
            @PathVariable(value = "beginTime") String beginTime,
            @PathVariable(value = "endTime") String endTime);
}
